﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework;

//This static class will handle all the rudimentary things required for the game 
//like player signing in and off, logging etc. 

namespace Imagine
{
    public static class Utility
    {
        public static void ShowSignInUI()  
        {
            if(Guide.IsVisible == false)
                Guide.ShowSignIn(1,false/*All Profiles*/);
        }

        public static float ToRadians(float radians)  { return radians * (float)(180.0f/Math.PI); }
        public static float ToDegrees(float radians)  { return radians * (float)(Math.PI/180.0f); }

        public static float PhysicsScale = 30.0f;       //To convert meteres into pixels and Vice Versa

        public static Vector2 Convert3DToScreenPos(Vector3 pos)
        {
            float width = Resolution._VWidth;
            float height = Resolution._VHeight;

            Vector4 pos3D = new Vector4( pos.X, pos.Y, pos.Z, 1.0f );
            Vector4 pos3Dtransformed = new Vector4();
          //  Vector4.Transform(pos3D, 
           // Vector2 pos2D;
            return new Vector2();
            

        }

        public static float VectorToAngle( Vector2 target, Vector2 current )
        {
            Vector2 m_dir = target - current;
            m_dir.Normalize();
            return (float)Math.Atan2(m_dir.X, -m_dir.Y);
        }

    }
}

